package chain_of_responsibility;

/**
 * @Author: linKe
 * @Date: 2022/1/14 22:57
 * @FileName: NameFilter
 * @version: 1.0
 * @Description: 过滤器调用
 * linKe改掉
 */
public class NameFilter implements Filter{
    @Override
    public void doFilter(Request request, Response response, FilterChain chain) {
        request.setRequestStr(request.getRequestStr().replaceAll("linKe", "萨比"));
        chain.doFilter(request, response, chain);
        response.setResponseStr(response.getResponseStr() + "\r\n---NameFilter");
    }
}
